package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * @author jiang
 */
@Mapper
public interface DishFlavorMapper {

    /**
     * 删除菜品口味
     * @param ids
     */
    void delete(List<Long> ids);

    /**
     * 添加菜品口味
     * @param flavorList
     */
    void addFlavor(List<DishFlavor> flavorList);

    /**
     * 根据菜品id查询菜品口味
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id = #{id}")
    List<DishFlavor> getById(Long id);
}
